import Vue, { createApp } from 'vue'
import App from '@/App.vue'
import router from '@/router'
import store from '@/store'

//引入ElementUI Plus 1、import以下css和组件  2、createApp(App).use(ElementPlus)
import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
//引入font-awesome图标库
import 'font-awesome/css/font-awesome.css'

import '@/assets/css/global.css' //引入asset全局css样式

/*自定义指令*/
import permissionDirective from '@/directives/permission';
import tokenUtil from '@/utils/tokenUtil';
import api from '@/utils/api';
//系统常量
import constants from '@/config/constants/systemConstants';

const app = createApp(App)
    .use(store)
    .use(router)
    .use(ElementPlus);

app.mount('#app');

//挂载全局属性或方法
app.config.globalProperties.$api = api; //axios
app.config.globalProperties.$tokenUtil = tokenUtil;
app.config.globalProperties.$constants = constants;

permissionDirective(app);



